//
//  UIViewController+YFBaseVcCategory.h
//  SquashSpark
//
//  Created by Coollang on 2017/11/3.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^NavBarItemActionBlock)(UIBarButtonItem *item);

@protocol UIViewControllerBaseDelegate <NSObject>

@optional;
- (void)customBaseBackNavBarItemAction:(UIBarButtonItem *)backItem;

@end

@interface UIViewController (YFBaseVcCategory)<UIViewControllerBaseDelegate>

- (void)setMenuNavBar;
// 统一设置默认样式的返回BarItem
- (void)setBaseBackBarItem;

+ (NSString *)defalutIndentify;

// 给导航栏添加navItem, imageName优先级大于 title
- (UIBarButtonItem *)addNavBarItemWithTitle:(NSString *)title orImageName:(UIImage *)image action:(NavBarItemActionBlock)barItemAction;

@property (nonatomic, weak) id <UIViewControllerBaseDelegate> yfBaseDelegate;

/** 是否可以通过侧滑手势打开侧边栏 */
@property (nonatomic, assign)BOOL canLeftOrRightGesOpenMenuView;

@end

@interface UIBarButtonItem (YFBarItem)
@property (nonatomic, copy)NavBarItemActionBlock navBarBlock;
@end
